package com.xukehong.demo.util;

import java.util.HashSet;
import java.util.List;

/**
 * @Author: xkh
 * @Date: 2019/8/1 16:13
 * @Version 1.0
 */
public class ToolsUtil {

    /**
     * 判断List集合中是否有重复元素
     */
    public boolean isRepeat(List<String> list) {
        HashSet<String> hashSet = new HashSet<>(list);
        boolean result = list.size() == hashSet.size();
        return result;
    }
}
